/* global Cesium */
const SvgPathBindingHandler = Cesium.SvgPathBindingHandler;
import * as Knockout from '../../../ThirdParty/knockout-es5/knockout-es5.min';

const registerKnockoutBindings = function() {
    SvgPathBindingHandler.register(Knockout);
    // KnockoutMarkdownBinding.register(Knockout);
    // KnockoutHammerBinding.register(Knockout);

    Knockout.bindingHandlers.embeddedComponent = {
        /* eslint-disable no-unused-vars */
        init: function(element, valueAccessor, allBindings, viewModel, bindingContext) {
            let component = Knockout.unwrap(valueAccessor());
            component.show(element);
            return { controlsDescendantBindings: true };
        },
        /* eslint-disable no-unused-vars */
        update: function(element, valueAccessor, allBindings, viewModel, bindingContext) {},
    };
};

export default registerKnockoutBindings;
